cmake_minimum_required(VERSION 3.10)
project(CarAssignment)

set(CMAKE_CXX_STANDARD 17)

# 添加编译器特定选项
if(MSVC)
    # 指定源字符集为UTF-8
    add_compile_options(/source-charset:utf-8)
    # 指定执行字符集为GBK (代码页936)
    add_compile_options(/execution-charset:.936)
endif()

# 包含头文件目录
include_directories(${PROJECT_SOURCE_DIR}/include)

# 添加可执行文件
add_executable(CarAssignment
    ${PROJECT_SOURCE_DIR}/src/main.cpp
    ${PROJECT_SOURCE_DIR}/src/tire.cpp
    ${PROJECT_SOURCE_DIR}/src/chassis.cpp
    ${PROJECT_SOURCE_DIR}/src/agx_kit.cpp
    ${PROJECT_SOURCE_DIR}/src/camera.cpp
    ${PROJECT_SOURCE_DIR}/src/lidar.cpp
    ${PROJECT_SOURCE_DIR}/src/gyroscope.cpp
    ${PROJECT_SOURCE_DIR}/src/lcd.cpp
    ${PROJECT_SOURCE_DIR}/src/battery.cpp
    ${PROJECT_SOURCE_DIR}/src/student.cpp
)

# 设置输出目录
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build)
